overlay: Fix child widget allocation
authorTimm Bäder <mail@baedert.org>
Thu, 20 Jul 2017 10:40:46 +0000 (12:40 +0200)
committerTimm Bäder <mail@baedert.org>
Thu, 20 Jul 2017 10:40:46 +0000 (12:40 +0200)
Just adding the overlay's own position is wrong now.

gtk/gtkoverlay.c

index 3e1de962328201c0e1dc4b193ab78aafb21708f3..9c46f34130b4f4b20d016d66f576e58cb5bb1763 100644 (file)
@@ -93,17 +93,12 @@ gtk_overlay_compute_child_allocation (GtkOverlay      *overlay,
                                       GtkOverlayChild *child,
                                       GtkAllocation   *widget_allocation)
 {
-  GtkAllocation allocation, overlay_allocation;
+  GtkAllocation allocation;
   gboolean result;
 
   g_signal_emit (overlay, signals[GET_CHILD_POSITION],
                  0, child->widget, &allocation, &result);
 
-  gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
-
-  allocation.x += overlay_allocation.x;
-  allocation.y += overlay_allocation.y;
-
   widget_allocation->x = allocation.x;
   widget_allocation->y = allocation.y;
   widget_allocation->width = allocation.width;